
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QDateTimeEdit>


class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    QDateTimeEdit *qdatetimedit;        //声明对象 

    QTimeEdit *qtimeedit;               //声明对象

    QDateEdit *qdateedit;               //声明对象

    //connect();






#endif // MAINWINDOW_H

};








#include "mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    this->setGeometry(0,0,800,600);

    qdatetimedit = new QDateTimeEdit(
                    QDateTime::currentDateTime(),this);

    qdatetimedit->setGeometry(300,200, 200,30);


    qtimeedit = new QTimeEdit(QTime::currentTime(),this);
    qtimeedit->setGeometry(300,240,200,30);



    qdateedit = new QDateEdit(QDate::currentDate(),this);
    qdateedit->setGeometry(300,280,200,30);









}

MainWindow::~MainWindow()
{




}
